//
//  myView.m
//  时尚男士
//
//  Created by 张家为 on 15/6/9.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "myView.h"
#define Width self.frame.size.width
#define Height self.frame.size.height
@implementation myView

- (instancetype)initWithFrame:(CGRect)frame{
   self =  [super initWithFrame:frame];
    if (self ) {
        self.imageView = [[UIImageView alloc] init];
        self.imageView.userInteractionEnabled = YES;
        [self addSubview:self.imageView];
        [_imageView release];
        
        self.TitleLable = [[UILabel alloc] init];
        [self addSubview:self.TitleLable];
        self.TitleLable.font = [UIFont systemFontOfSize:15];
        [_TitleLable release];
        
        self.lable = [[UILabel alloc] init];
        [self addSubview:self.lable];
        self.lable.numberOfLines = 0;
        self.lable.font = [UIFont systemFontOfSize:13];
        self.lable.textColor = [UIColor grayColor];
        [_lable release];
    }
    return self;
}
- (void)layoutSubviews{
    [super layoutSubviews];
    self.imageView.frame = CGRectMake(0, 0, Height * 1.3, Height);
    self.TitleLable.frame = CGRectMake(Height * 1.3 + 10, 0, Width  - Height * 1.3 - 10 , Height / 4);
    self.lable.frame =CGRectMake(Height * 1.3 + 10, Height / 4 + 4,Width - Height * 1.3 - 10 , Height / 4 * 3 - 4);
}
-(void)dealloc{
    [_imageView release];
    [_lable release];
    [_TitleLable release];
    [super dealloc];
}

@end
